package com.portal.framework.page.pagebar;

import com.portal.framework.common.lang.NameValueCollection;

/**
 * 分页条格式器工厂
 * 
 * @author ¬˸��
 * @date 2007-9-1
 */
public class PageBarFormatterFactory {
	private static NameValueCollection<IPageBarFormatter> lst;
	/**
	 * 默认的分页条格式器
	 */
	private static IPageBarFormatter defFormatter = new DefaultPageBarFormatter();

	public static IPageBarFormatter getDefault() {
		return defFormatter;
	}

	public static void setDefault(IPageBarFormatter defFormatter) {
		PageBarFormatterFactory.defFormatter = defFormatter;
	}

	public static IPageBarFormatter get(String name) {
		return lst.get(name);
	}

	public static void add(String name, IPageBarFormatter formatter) {
		lst.add(name, formatter);
	}

}
